﻿using System;
using System.Collections.Generic;
using System.Linq.Expressions;
using System.Text;

namespace XKPlatform.DataModels.Dao.BaseEntity
{
    public class SortInfo<T, T2>
    {
        /// <summary>
        /// 排序字段
        /// </summary>
        public Expression<Func<T, T2>> Orderby { get; set; }

        /// <summary>
        /// 页码
        /// </summary>
        public SortEnum SortMethods { get; set; }
    }
    /// <summary>
    /// 用户类型
    /// </summary>
    public enum SortEnum
    {
        Asc = 1,
        Desc = 2
    }
    /// <summary>
    /// 列表数据返回对象
    /// </summary>
    /// <typeparam name="T"></typeparam>
    public class PageInfo
    {
        /// <summary>
        /// 排序字段
        /// </summary>
        public string Order { get; set; }

        /// <summary>
        /// 页码
        /// </summary>
        public int PageIndex { get; set; }

        /// <summary>
        /// 页记录数
        /// </summary>
        public int PageSize { get; set; }

        /// <summary>
        /// 排序方式
        /// </summary>
        public string Sort { get; set; }

        /// <summary>
        /// 总计数量
        /// </summary>
        public int Total { get; set; }

        /// <summary>
        /// 是否获取总数
        /// </summary>
        public bool IsPaging { get; set; }
    }
}
